package com.example.interfacedesign;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        //显示的五个按钮
        Button button_uc1=(Button) findViewById(R.id.button1);
        Button button_uc2=(Button) findViewById(R.id.button2);
        Button button_uc3=(Button) findViewById(R.id.button3);
        Button button_uc4=(Button) findViewById(R.id.button4);
        Button button_uc5=(Button) findViewById(R.id.button5);

        //给按钮添加点击事件
        button_uc1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,UC1.class);
                startActivity(intent);
            }
        });

        button_uc2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,UC2.class);
                startActivity(intent);
            }
        });

        button_uc3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,UC3.class);
                startActivity(intent);
            }
        });

        button_uc4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,UC4.class);
                startActivity(intent);
            }
        });

        button_uc5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(MainActivity.this,UC5.class);
                startActivity(intent);
            }
        });
    }

}